package com.bit.spring_mybatisdemo1.LogDemo;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("log")
@RestController
public class LogTest {


    public static Logger logger= LoggerFactory.getLogger(LogTest.class);

    @RequestMapping("test1")
    public String log1(){
        logger.info("info级别日志");
        logger.error("error级别日志");
        logger.warn("warn级别日志");
        return "1";
    }

    @RequestMapping("test2")
    public String log2(){
        log.info("info级别日志");
        log.error("error级别日志");
        log.warn("warn级别日志");
        return "1";
    }

}
